<template>
  <div id="app">
    <img src="./assets/logo.png">
    <!-- <el-ol v-if="show" class="el-ol">
      <ul v-for="site in message" :key="site.id">{{ site.name }}</ul>
    </el-ol>-->
    <el-select v-model="myvlue" value-key="id" placeholder="请选择" @change="handlueCahnge">
      <el-option v-for="site in message" :key="site.id" :label="site.name" :value="site"></el-option>
    </el-select>

    <el-button type="text" @click="dialogFormVisible = true">的</el-button>

    <el-dialog :visible.sync="dialogFormVisible"  :show-close=false :center=true>
      <el-select v-model="myvlue" value-key="id" placeholder="请选择" @change="handlueCahnge">
        <el-option v-for="site in message" :key="site.id" :label="site.name" :value="site"></el-option>
      </el-select>
      <!-- <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>-->
    </el-dialog>

    <div class="a">
      <el-button>默认按钮</el-button>
    </div>
    <div class="a">
      <el-button type="primary">主要按钮</el-button>
    </div>
    <div class="a">
      <el-button>默认按钮</el-button>
    </div>
    <div class="a">
      <el-button>默认按钮</el-button>
    </div>
    <div class="a">
      <el-button>默认按钮</el-button>
    </div>
    <div class="a">
      <el-button>默认按钮</el-button>
    </div>
    <div class="a">
      <el-button>默认按钮</el-button>
    </div>

    <!--  <ul>
      <li v-for="value in object" :key="value">{{ value }}</li>
    </ul>
    <ol>
      <ul v-for="s in groceryList" :key="s.id">{{ s.text }}1</ul>
    </ol>-->
    <!-- {{ groceryList }} -->
    <!-- <router-view v-if="show"/> -->
  </div>
</template>

<script>
import axios from "axios";

var setm;
export default {
  name: "App",
  data() {
    return {
      message: "ddddddd",
      show: false,
      myvlue: null,
      dialogFormVisible: false,
      formLabelWidth: "120px",
			close:false
    };
  },
  props: ["value"],
  mounted() {
    axios
      .get("/renda/appclient/index.do", {
        params: {
          invoke: "getCategory",
          sd: this.sd
        }
      })
      .then(
        response => (
          (this.message = response.data.result),
          (this.show = true),
          (this.myvlue = this.message[0])
        )
      );
  },
  methods: {
    handlueCahnge: function(index) {
      console.log(index);
      setm = index;
      console.log(setm);
      this.dialogFormVisible = false;
      // console.log(value);
    }
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.a {
  margin-top: 15px;
}
</style>
